
/*---------------------------------------------------------
   Initializes the effect. The data is a table of data 
   which was passed from the server.
---------------------------------------------------------*/
function EFFECT:Init( data )
	
	local TargetEntity = data:GetEntity()
	if ( !TargetEntity || !TargetEntity:IsValid() ) then return end
	
	local vOffset = TargetEntity:GetBonePosition( 2 )
		
	local emitter = ParticleEmitter( vOffset )
	
		for i=0, 4 do
			
			local particle = emitter:Add( "effects/spark", vOffset )
			if (particle) then
			
				particle:SetVelocity( Vector(0,15, 30) )
				particle:SetLifeTime( i / 15 )
				particle:SetDieTime( math.Rand( 0.5, 1.0 ) )
				particle:SetStartAlpha( math.Rand( 200, 255 ) )
				particle:SetEndAlpha( 0 )
				particle:SetStartSize( 1 )
				particle:SetEndSize( 2 )
				particle:SetRoll( math.Rand(0, 360) )
				particle:SetRollDelta( 0 )
				
				//particle:SetAirResistance( 100 )
				particle:SetGravity( Vector( 0, 0, -700 ) )
				particle:SetCollide( false )
				
			end
			
		end
		
	emitter:Finish()
	
end


/*---------------------------------------------------------
   THINK
---------------------------------------------------------*/
function EFFECT:Think( )
	return false
end

/*---------------------------------------------------------
   Draw the effect
---------------------------------------------------------*/
function EFFECT:Render()
end
